package com.cgi.map.activityanalyser.service.services;

import java.io.File;
import java.util.ArrayList;

import com.cgi.map.activityanalyser.model.app.AppPrefs;
import com.cgi.map.activityanalyser.model.app.AppPrefs.AvailablePath;
import com.cgi.map.activityanalyser.service.services.interfaces.IFolderService;

public class FolderService implements IFolderService{

	@Override
	public ArrayList<String> getFolders() {
		ArrayList<String> folders = new ArrayList<String>();
		
		String dotNetFolder = AppPrefs.getInstance().getPath(AvailablePath.DotNet);
		
		File[] files = new File(dotNetFolder).listFiles();

		for (File file : files) {
		    if (file.isFile()) {
		    	folders.add(file.getName());
		    }
		}
		
		return folders;
	}

}
